<div class="fui-tab fui-tab-success"  ng-init="checkobj({pagevalue},'params')">
	<a ng-repeat="(value,title) in {tabs}" ng-class="{'active':{pagevalue}.params.{tab_field}==value}" class="external" href="javascript:;" ng-click="{pagevalue}.params.{tab_field}=value;{pagevalue}.get_list(true)" >{{title}}</a>
</div>
<div class='content-empty' ng-show="{pagevalue}.{data}.length<=0">
    <i class='fa fa-comment-o'></i>
    <br/>{empty_message}
</div>
<div ng-if="{pagevalue}.{data}.length>0">
	<div class="fui-list-group address-item" style='margin-top:5px;' ng-repeat="item in {pagevalue}.{data} track by item.id">
	    <div  class="fui-list" >
		<div class="fui-list-inner">
		    <div class="title" ng-if="{title_fields}.length>0"><span ng-repeat="field in {title_fields}">{{item[field]}}&nbsp;&nbsp;</span></div>
			<div class="text" ng-if="{text_fields}.length>0"><span ng-repeat="field in {text_fields}">{{item[field]}}&nbsp;&nbsp;</span></div>
		    <div class='bar' ng-if="{action_r}.length>0 || {action_l}.length>0">
			
			<span class='pull-right'>
			    <span ng-repeat="ac in {action_r}">
				<a class="external"  href="javascript:;" ng-if="ac.type=='href'" ng-click="access_json(ac.url,'{key}='+item.{key})">
				<i class='fa {{ac.icon}}'></i> {{ac.title}}
			    </a>
				<a class="external"  href="javascript:;" ng-if="ac.type=='post'" ng-click="post({},ac.op,'{key}='+item.{key})">
				<i class='fa {{ac.icon}}'></i> {{ac.title}}
			    </a>
				<label class='radio-inline' ng-if="ac.type=='radio'">
					<input type="radio" class="fui-radio  fui-radio-danger" ng-checked="item[ac.field]==ac.value" ng-click="temp={};temp[ac.field]=ac.value;post(temp,ac.op,'{key}='+item.{key})"/> {{ac.title}}
				</label>
				&nbsp;&nbsp;
				</span>
			</span>
			<span ng-repeat="ac in {action_l}">
				<a class="external"  href="javascript:;" ng-if="ac.type=='href'" ng-click="access_json(ac.url,'{key}='+item.{key})">
				<i class='fa {{ac.icon}}'></i> {{ac.title}}
			    </a>
				<a class="external"  href="javascript:;" ng-if="ac.type=='post'" ng-click="post({},ac.op,'{key}='+item.{key})">
				<i class='fa {{ac.icon}}'></i> {{ac.title}}
			    </a>
				<label class='radio-inline' ng-if="ac.type=='radio'">
					<input type="radio" class="fui-radio  fui-radio-danger" ng-checked="item[ac.field]==ac.value" ng-click="temp={};temp[ac.field]=ac.value;post(temp,ac.op,'{key}='+item.{key})"/> {{ac.title}}
				</label>
				&nbsp;&nbsp;
			</span>
		    </div>
		</div>
		<div class='fui-list-angle' ng-if="'{remark_field}'!='empty'">
			<span class='fui-label fui-label-default'>{{item.{remark_field}}}</span>
        </div>
	    </div>
	</div>
	<div id="loading" style="display:none;text-align:center;">加载中</div>
	<div id="loadmore" style="display:none;text-align:center;" ng-click="{pagevalue}.get_list()">加载更多</div>
	<div id="loaded" style="display:none;text-align:center;">已加载全部数据</div>
</div>

	<script>
	if('{list_op}'!=''){
		//数据加载函数
		if(!scope.{pagevalue}.{data} && !Array.isArray(scope.{pagevalue}.{data})){
			scope.{pagevalue}.{data}=[];
		}
		scope.{pagevalue}.get_list=function(first){
			if(first){
				//初次加载
				scope.{pagevalue}.page=1;
				scope.{pagevalue}.{data}=[];
				scope.{pagevalue}.loaded=false;
				$('#loaded').hide();
			}else if(!scope.{pagevalue}.page){
				scope.{pagevalue}.page=1;
			}else{
				scope.{pagevalue}.page++;
			}
			if(scope.{pagevalue}.loaded){
				return;
			}
			if(scope.{pagevalue}.loading){
				return;
			}else{
				scope.{pagevalue}.loading=true;
			}
			$('#loading').show();$('#loadmore').hide();
			var query='page='+scope.{pagevalue}.page;
			if(scope.page.query){
				query+='&'+scope.page.query;
			}
			var more_query=scope.made_query(scope.{pagevalue}.params);
			if(more_query){
				query+='&'+more_query;
			}
			scope.get_data(function(res){
				if(!Array.isArray(res)){
					console.log('数据加载失败！');
					console.log(res);
					return;
				}
				if(res.length==0){
					scope.{pagevalue}.loaded=true;
					scope.$apply();
					scope.{pagevalue}.loading=false;
					$('#loading').hide();
					$('#loaded').show();
					return;
				}
				res.forEach(function(v){
					scope.{pagevalue}.{data}.push(v);
				});
				scope.{pagevalue}.loading=false;
				scope.$apply();
				$('#loading').hide();
				$('#loadmore').show();
				
			},'',{'op':'{list_op}','query':query});
		}
		//首次加载
		scope.{pagevalue}.get_list(true);
		//滑到页面底部时加载下一页
		scope.scroll(function(){
			scope.{pagevalue}.get_list();
		});
	}
	</script>